<?php

namespace app\article\controller;

use think\Config;
use think\Db;
use think\Controller;


class Article extends Controller
{
    //小程序
    public function index($offset=0, $pageSize=4)
    {
        $map['status'] = 0;
        $lists = db('article')->select(function ($query) use ($offset, $pageSize) {
            $query->where('status', 0)
                ->order('id desc')
                ->limit($offset, $pageSize);
        });
        return $this->sucReturn($lists);
    }
}
